<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>酒仙网-白酒、红酒、洋酒、保健酒、黄酒、酒具官方旗舰店</title>
    <link rel="stylesheet" href="css/login.css">
    <link rel="shortcut icon" href="imgs/favicon.ico" />
</head>

<body>
    <header>
        <div>
            <a href="index.html"><img src="imgs/10001.png" alt=""></a>
            <img src="imgs/zhuc002.jpg" alt="">
        </div>
        <ul>
            <li>欢迎来到酒仙网</li>
            <li><a href="regist.html">免费注册</a></li>
            <li>帮助中心<b><span></span></b>
                <ol>
                    <li>配送说明</li>
                    <li>支付方式</li>
                    <li>售后服务</li>
                    <li>企业客户</li>
                    <li></li>
                </ol>
            </li>
        </ul>
    </header>
    <main>

        <ul class="box2">
            <div class="box"></div>
            <li><a href=""><b>账号登录</b></a>
                <span></span>
                <p>手机动态密码登录</p>
            </li>
            <li><span></span><input type="text" name="" id="ipt" placeholder="用户名/邮箱/手机号"></li>
            <li><span></span><input type="text" name="" id="pwd" placeholder="密码"></li>
            <li><span></span><input type="text" name="" id="" placeholder="验证码"><b></b></li>
            <li><button onclick="reg()">登  录</button></li>
            <li>
                <p>忘记密码</p><a href="regist.html">免费注册</a></li>
            <li>
                <p>使用合作账号登录</p><span></span><span></span><span></span><span></span></li>
        </ul>
        <ol class="box3">
            <div class="box1"></div>
            <li><b>扫码登录</b></li>
            <li><img src="imgs/saoma001.jpg" alt="" class="erweima1"><i class="erweima"></i></li>
            <li>
                <span></span>
                <dl>
                    <p>打开<b>手机酒仙APP</b></p>
                    <p>扫描二维码</p>
                </dl>
            </li>
            <li>
                <a class="login-style" href="login.html">账号密码登录</a>
                <a class="login-style" href="regist.html">免费注册</a>
            </li>
        </ol>

        <script src="js/axios.js"></script>
        <script>
            function reg() {
                //console.log("ooo");
                axios
                    .get("http://jx.xuzhixiang.top/ap/api/login.php", {
                        params: {
                            username: ipt.value,
                            password: pwd.value,
                        },
                    })
                    .then((res) => {
                        console.log(res.data, res);
                        if (res.data.code == 1) {
                            location.href = "index.html";
                            localStorage.setItem("uid", res.data.data.id);
                            localStorage.setItem("token", res.data.data.token);
                        } else {
                            alert("chongshi");
                        }
                    });
            }

            let oBox = document.querySelector('.box');
            let aBox = document.querySelector('.box1');
            let oOl = document.querySelector('.box3');
            let oUl = document.querySelector('.box2');
            let oImg = document.querySelector('.erweima1');
            let oI = document.querySelector('.erweima');
            oBox.onclick = function() {
                oOl.style.display = 'block';
                oUl.style.display = 'none'
            }
            aBox.onclick = function() {
                oUl.style.display = 'block';
                oOl.style.display = 'none'
            }
            oImg.onmouseover = function() {
                oI.style.opacity = 1;
            }
            oImg.onmouseout = function() {
                oI.style.opacity = 0;
            }
        </script>
    </main>
    <footer>
        <p>© 酒仙网 2011 jiuxian.com All Rights Reserved 京ICP证110141号 京公网安备1101050188221</p>
        <span>购买前请确认达到法定饮酒年龄!酒仙网不销售任何含酒精产品给18岁以下人士!</span>
    </footer>
</body>

</html>